//
//  Extension+UIlable.swift
//  YDWeibo01
//
//  Created by suibian on 16/8/13.
//  Copyright © 2016年 iitcast. All rights reserved.
//

import UIKit
extension UILabel{

    convenience init(textColor:UIColor,textSize:CGFloat,maxWidth:CGFloat = 0){
    
    self.init()
        let label = UILabel()
        self.textColor = textColor
        self.font = UIFont.systemFontOfSize(textSize)
        if maxWidth > 0{
//            换行
            self.numberOfLines = 0
//        显示最大宽度
            self.preferredMaxLayoutWidth = maxWidth
        }
        
    
    }


}